import { request } from './request'
import qs from 'qs'

// 提交职业规划
export function publishCareerPlan(data) {
  return request({
    method: 'post',
    url: 'career/publishCareerPlan/',
    // { indices: false }作用是去除请求体中的下标
    data: qs.stringify(data, { indices: false })
  })
}

// 保存职业规划
export function saveCareerPlan(data) {
  return request({
    method: 'post',
    url: 'career/saveCareerPlan/',
    data: qs.stringify(data, { indices: false })
  })
}

// 更新职业规划
export function modifyCareerPlan(data) {
  return request({
    method: 'post',
    url: 'career/modifyCareerPlan/',
    data: qs.stringify(data, { indices: false })
  })
}

// 删除职业规划
export function deleteCareerPlan(params) {
  return request({
    url: 'career/deletedCareerPlan/',
    params: params
  })
}

// 根据id获取职业规划详情
export function getCareerPlan(params) {
  return request({
    url: 'career/getCareerPlan/',
    params: params
  })
}

// 获取职业规划列表
export function getCareerPlanList(params) {
  return request({
    url: 'career/manage/',
    params: params
  })
}

// 获取评论列表
export function getCareerCommentList(params) {
  return request({
    url: 'career/careerComments/',
    params: params
  })
}
